﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cspl.Calculator.Lib;
using Cspl.Calculator.Lib.Model;

namespace Cspl.Calculator.Main
{
    public class Program
    {
        public static void Main(string[] args)
        {
            MainCalculator calculator = new MainCalculator();
            CalModel data1 = new CalModel(); //{ IntegerValue1 = 20, IntegerValue2 = 14, Operation = CalOperations.AddList };

            data1.ListOfIntegerValue = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            data1.IntegerValue1 = 20;
            data1.IntegerValue2 = 14;
            data1.Operation = CalOperations.Add;
            data1.Mode = CalMode.List;

            calculator.Data = data1;
            int result = 0;

            try
            {
                result = calculator.Calculate();
            }
            catch (Exception ex)
            {
                Console.WriteLine("An Exception occurred : "+ ex.Message);
            }
        }
    }
}
